// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/*!
 * @file home_position.h
 * This header file contains the declaration of the described types in the IDL file.
 *
 * This file was generated by the tool gen.
 */

#ifndef _HOME_POSITION_H_
#define _HOME_POSITION_H_

// TODO Poner en el contexto.

#include <stdint.h>
#include <array>
#include <string>
#include <vector>
#include <map>
#include <bitset>

#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#define eProsima_user_DllExport __declspec( dllexport )
#else
#define eProsima_user_DllExport
#endif
#else
#define eProsima_user_DllExport
#endif

#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#if defined(home_position_SOURCE)
#define home_position_DllAPI __declspec( dllexport )
#else
#define home_position_DllAPI __declspec( dllimport )
#endif // home_position_SOURCE
#else
#define home_position_DllAPI
#endif
#else
#define home_position_DllAPI
#endif // _WIN32

namespace eprosima
{
    namespace fastcdr
    {
        class Cdr;
    }
}


/*!
 * @brief This class represents the structure home_position defined by the user in the IDL file.
 * @ingroup HOME_POSITION
 */
class home_position
{
public:

    /*!
     * @brief Default constructor.
     */
    eProsima_user_DllExport home_position();

    /*!
     * @brief Default destructor.
     */
    eProsima_user_DllExport ~home_position();

    /*!
     * @brief Copy constructor.
     * @param x Reference to the object home_position that will be copied.
     */
    eProsima_user_DllExport home_position(const home_position &x);

    /*!
     * @brief Move constructor.
     * @param x Reference to the object home_position that will be copied.
     */
    eProsima_user_DllExport home_position(home_position &&x);

    /*!
     * @brief Copy assignment.
     * @param x Reference to the object home_position that will be copied.
     */
    eProsima_user_DllExport home_position& operator=(const home_position &x);

    /*!
     * @brief Move assignment.
     * @param x Reference to the object home_position that will be copied.
     */
    eProsima_user_DllExport home_position& operator=(home_position &&x);

    /*!
     * @brief This function sets a value in member timestamp_
     * @param _timestamp_ New value for member timestamp_
     */
    eProsima_user_DllExport void timestamp_(uint64_t _timestamp_);

    /*!
     * @brief This function returns the value of member timestamp_
     * @return Value of member timestamp_
     */
    eProsima_user_DllExport uint64_t timestamp_() const;

    /*!
     * @brief This function returns a reference to member timestamp_
     * @return Reference to member timestamp_
     */
    eProsima_user_DllExport uint64_t& timestamp_();

    /*!
     * @brief This function sets a value in member lat_
     * @param _lat_ New value for member lat_
     */
    eProsima_user_DllExport void lat_(double _lat_);

    /*!
     * @brief This function returns the value of member lat_
     * @return Value of member lat_
     */
    eProsima_user_DllExport double lat_() const;

    /*!
     * @brief This function returns a reference to member lat_
     * @return Reference to member lat_
     */
    eProsima_user_DllExport double& lat_();

    /*!
     * @brief This function sets a value in member lon_
     * @param _lon_ New value for member lon_
     */
    eProsima_user_DllExport void lon_(double _lon_);

    /*!
     * @brief This function returns the value of member lon_
     * @return Value of member lon_
     */
    eProsima_user_DllExport double lon_() const;

    /*!
     * @brief This function returns a reference to member lon_
     * @return Reference to member lon_
     */
    eProsima_user_DllExport double& lon_();

    /*!
     * @brief This function sets a value in member alt_
     * @param _alt_ New value for member alt_
     */
    eProsima_user_DllExport void alt_(float _alt_);

    /*!
     * @brief This function returns the value of member alt_
     * @return Value of member alt_
     */
    eProsima_user_DllExport float alt_() const;

    /*!
     * @brief This function returns a reference to member alt_
     * @return Reference to member alt_
     */
    eProsima_user_DllExport float& alt_();

    /*!
     * @brief This function sets a value in member x_
     * @param _x_ New value for member x_
     */
    eProsima_user_DllExport void x_(float _x_);

    /*!
     * @brief This function returns the value of member x_
     * @return Value of member x_
     */
    eProsima_user_DllExport float x_() const;

    /*!
     * @brief This function returns a reference to member x_
     * @return Reference to member x_
     */
    eProsima_user_DllExport float& x_();

    /*!
     * @brief This function sets a value in member y_
     * @param _y_ New value for member y_
     */
    eProsima_user_DllExport void y_(float _y_);

    /*!
     * @brief This function returns the value of member y_
     * @return Value of member y_
     */
    eProsima_user_DllExport float y_() const;

    /*!
     * @brief This function returns a reference to member y_
     * @return Reference to member y_
     */
    eProsima_user_DllExport float& y_();

    /*!
     * @brief This function sets a value in member z_
     * @param _z_ New value for member z_
     */
    eProsima_user_DllExport void z_(float _z_);

    /*!
     * @brief This function returns the value of member z_
     * @return Value of member z_
     */
    eProsima_user_DllExport float z_() const;

    /*!
     * @brief This function returns a reference to member z_
     * @return Reference to member z_
     */
    eProsima_user_DllExport float& z_();

    /*!
     * @brief This function sets a value in member yaw_
     * @param _yaw_ New value for member yaw_
     */
    eProsima_user_DllExport void yaw_(float _yaw_);

    /*!
     * @brief This function returns the value of member yaw_
     * @return Value of member yaw_
     */
    eProsima_user_DllExport float yaw_() const;

    /*!
     * @brief This function returns a reference to member yaw_
     * @return Reference to member yaw_
     */
    eProsima_user_DllExport float& yaw_();

    /*!
     * @brief This function sets a value in member valid_alt_
     * @param _valid_alt_ New value for member valid_alt_
     */
    eProsima_user_DllExport void valid_alt_(bool _valid_alt_);

    /*!
     * @brief This function returns the value of member valid_alt_
     * @return Value of member valid_alt_
     */
    eProsima_user_DllExport bool valid_alt_() const;

    /*!
     * @brief This function returns a reference to member valid_alt_
     * @return Reference to member valid_alt_
     */
    eProsima_user_DllExport bool& valid_alt_();

    /*!
     * @brief This function sets a value in member valid_hpos_
     * @param _valid_hpos_ New value for member valid_hpos_
     */
    eProsima_user_DllExport void valid_hpos_(bool _valid_hpos_);

    /*!
     * @brief This function returns the value of member valid_hpos_
     * @return Value of member valid_hpos_
     */
    eProsima_user_DllExport bool valid_hpos_() const;

    /*!
     * @brief This function returns a reference to member valid_hpos_
     * @return Reference to member valid_hpos_
     */
    eProsima_user_DllExport bool& valid_hpos_();

    /*!
     * @brief This function sets a value in member manual_home_
     * @param _manual_home_ New value for member manual_home_
     */
    eProsima_user_DllExport void manual_home_(bool _manual_home_);

    /*!
     * @brief This function returns the value of member manual_home_
     * @return Value of member manual_home_
     */
    eProsima_user_DllExport bool manual_home_() const;

    /*!
     * @brief This function returns a reference to member manual_home_
     * @return Reference to member manual_home_
     */
    eProsima_user_DllExport bool& manual_home_();


    /*!
     * @brief This function returns the maximum serialized size of an object
     * depending on the buffer alignment.
     * @param current_alignment Buffer alignment.
     * @return Maximum serialized size.
     */
    eProsima_user_DllExport static size_t getMaxCdrSerializedSize(size_t current_alignment = 0);

    /*!
     * @brief This function returns the serialized size of a data depending on the buffer alignment.
     * @param data Data which is calculated its serialized size.
     * @param current_alignment Buffer alignment.
     * @return Serialized size.
     */
    eProsima_user_DllExport static size_t getCdrSerializedSize(const home_position& data, size_t current_alignment = 0);


    /*!
     * @brief This function serializes an object using CDR serialization.
     * @param cdr CDR serialization object.
     */
    eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const;

    /*!
     * @brief This function deserializes an object using CDR serialization.
     * @param cdr CDR serialization object.
     */
    eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr);



    /*!
     * @brief This function returns the maximum serialized size of the Key of an object
     * depending on the buffer alignment.
     * @param current_alignment Buffer alignment.
     * @return Maximum serialized size.
     */
    eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize(size_t current_alignment = 0);

    /*!
     * @brief This function tells you if the Key has been defined for this type
     */
    eProsima_user_DllExport static bool isKeyDefined();

    /*!
     * @brief This function serializes the key members of an object using CDR serialization.
     * @param cdr CDR serialization object.
     */
    eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const;

private:
    uint64_t m_timestamp_;
    double m_lat_;
    double m_lon_;
    float m_alt_;
    float m_x_;
    float m_y_;
    float m_z_;
    float m_yaw_;
    bool m_valid_alt_;
    bool m_valid_hpos_;
    bool m_manual_home_;
};

#endif // _HOME_POSITION_H_